package com.partner.service.sms;

import org.springframework.stereotype.*;
import org.springframework.beans.factory.annotation.*;

import com.partner.frame.*;
import com.partner.bean.sms.Sms;
import com.partner.mapper.sms.SmsMapper;

@Service("smsService")
public class SmsService extends BaseService<Sms> {

	@Autowired
	private SmsMapper serviceMapper;

	public SmsMapper getServiceMapper() {
		return serviceMapper;
	}
	
	
	/**
	 * 保存验证码发送信息
	 * @param Sms
	 * @return
	 */
	public void insert(Sms s){
		try {
			serviceMapper.insert(s);
		} catch (Exception e) {
			e.printStackTrace();
		}
		
	}

	/**
	 * 获取验证码信息
	 * @param account
	 * @return
	 */
	public Sms getUserCaptcha(String account,String type) {
		return serviceMapper.getUserCaptcha(account,type);
	}
	
}
